import request from '@/utils/request.js'
// 获取自定义菜单
export function fetchMenu () {
  return request({
    url: '/admin/wx.menu/getMenu',
    method: 'GET'
  })
}
// 更新自定义菜单
export function updateMenu(data) {
  return request({
    url: '/admin/wx.menu/updateMenu',
    method: 'POST',
    data
  })
}
// 获取自动回复设置
export function autoReply() {
  return request({
    url: '/admin/wx.auto_reply/index',
    method: 'get'
  })
}
// 设置自动回复内容
export function autoReplySet(data) {
  return request({
    url: '/admin/wx.auto_reply/setting',
    method: 'POST',
    data
  })
}
// 获取模版消息行业设置
export function getIndustry() {
  return request({
    url: '/admin/wx.template_message/get_industry',
    method: 'get'
  })
}
// 设置模版消息内容
export function setIndustry(industryId1, industryId2) {
  return request({
    url: '/admin/wx.template_message/set_industry',
    method: 'POST',
    data: {
      industryId1,
      industryId2
    }
  })
}
// 获取模版列表
export function getTemplate() {
  return request({
    url: '/admin/wx.template_message/get_template',
    method: 'get'
  })
}
// 添加模版
export function addTemplate(shortId) {
  return request({
    url: '/admin/wx.template_message/add_template',
    method: 'post',
    data: {
      shortId
    }
  })
}
// 删除模版
export function delTemplate(templateId) {
  return request({
    url: '/admin/wx.template_message/del_template',
    method: 'DELETE',
    data: {
      templateId
    }
  })
}
export function settingsClearQuota() {
  return request({
    url: '/admin/wx.settings/clear_quota',
    method: 'GET'
  })
}
export function settingsGetValidIps() {
  return request({
    url: '/admin/wx.settings/get_valid_ips',
    method: 'GET'
  })
}
